{extend name="public:_base" /}
{block name="js"}
{include file="public/_validform"}
<script type="text/javascript">
    $("[title={$Request.param.model ?? ''}]").addClass("btn-success");
    $('.mobile').html("手机");
    $('.pc').html("电脑");
</script>

{/block}
{block name="main"}

<div class="page-container">

    <form name="" method="post" action="{:\\think\\Url::build(\'dolistsave\')}" id="form">

        <div class="cl pd-5 bg-1 bk-gray">

            {include file="public:_edittitle"}

            <!--<nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">-->
                <!--<ul class="cl">-->
                    <!--<li class="dropDown dropDown_hover btn radius radius">-->
                        <!--<a href="#" class="dropDown_A">状态<i class="Hui-iconfont">&#xe6d5;</i></a>-->
                        <!--<ul class="dropDown-menu menu radius box-shadow">-->
                            <!--<li><a title="" href="{:url(\''.\\think\\Request::instance()->controller().'/index')}">所有</a></li>-->
                            <!--<li><a title="index" href="{:url(\''.\\think\\Request::instance()->controller().'/index',['model'=>'index'])}">电脑</a></li>-->
                            <!--<li><a title="mobile" href="{:url(\''.\\think\\Request::instance()->controller().'/index',['model'=>'mobile'])}">手机</a></li>-->
                        <!--</ul>-->
                    <!--</li>-->
                <!--</ul>-->
            <!--</nav>-->

            <span class="dropDown dropDown_hover __web-inspector-hide-shortcut__ btn-warning news-dropDown">
                <button class="btn radius btn-warning dropdown-toggle dropDown_A" type="button" name="move" data-toggle="dropdown" aria-expanded="false">
                    显示
                    <i class="Hui-iconfont">&#xe6d5;</i>
                    <!--<span class="caret"></span>-->
                </button>

                <ul class="dropDown-menu menu radius box-shadow">
                    <li>
                        <a class="btn" title="" href="{:url(\''.\\think\\Request::instance()->controller().'/index')}">所有</a>
                    </li>

                    <li>
                        <a class="btn" title="index" href="{:url(\''.\\think\\Request::instance()->controller().'/index',['model'=>'pc'])}">电脑</a>
                    </li>

                    <li>
                        <a class="btn" title="mobile" href="{:url(\''.\\think\\Request::instance()->controller().'/index',['model'=>'mobile'])}">手机</a>
                    </li>
                </ul>
            </span>

            <span class="r">共有数据：<strong>{$num}</strong> 条</span>
        </div>

        <div class="mt-10">
                    <table class="layui-table">
                <thead>
                <tr class="text-c">
                    <th width="20"><input name="" type="checkbox" value=""></th>
                    <th width="40">{:sort_by('ID','id')}</th>
                    <th width="100">图片</th>
					<th width="100">标题</th>
                    <th width="30">板块</th>
                    <th width="100">连接地址</th>
                    <th width="40">{:sort_by('排序','sort')}</th>
                    <th width="40">{:sort_by('状态','status')}</th>
                    <th width="120">操作</th>
                </tr>
                </thead>

                <tbody>
                    {volist name="list" id="vo" empty="$_html_empty"}
                    <tr class="text-c va-m">
                        <td><input name="id[]" type="checkbox" value="{$vo.id}"></td>
                    <td>{$Think.get.page?(($Think.get.page-1)*$Think.config.paginate.list_rows+$i):($i)}</td>

                        
                        <td>
                            <a href="__PUBLIC__/uploads/image/{$vo.image}" target="_blank"><img onmouseover="layer_tips=layer.tips('<img src=__PUBLIC__/uploads/image/{$vo.image} width=860px class=\'layer_tips_img\'>',this,{tips: [1, '#fff']});" onmouseout="layer.close(layer_tips);" src="__PUBLIC__/uploads/image/{$vo.image}" title="{$vo.title}" width="160px" height="50px" /></a>
                        </td>
						<td class="text-l">
                            {$vo.title}
                        </td>
                        <td>
                            <div class="{$vo.model}">{$vo.model}</div>
                        </td>
                        <td>
                            {notempty name="vo.url"}<a href="{$vo.url}" target="_blank" ><i class="Hui-iconfont">&#xe640;</i>预览</a>{/notempty}
                        </td>
                        <td>
                            {$vo.sort|sortby=$vo.id}
                        </td>
                        <td>
                            {$vo.status|status=$vo.id}
                        </td>
                        <td class="td-manage">
                            <a style="text-decoration:none" class="btn radius btn-xs btn-success"
                               onClick="edit('编辑','{:url(\''.\\think\\Request::instance()->controller().'/edit',['id'=>$vo.id])}','10001')"
                               href="javascript:;"
                               title="编辑">编辑</a>
                            <!--<a style="text-decoration:none" class="btn radius btn-xs btn-danger"-->
                               <!--onClick="del_old(this,'{:url(\''.\\think\\Request::instance()->controller().'/del',['id'=>$vo.id])}','10001')"-->
                               <!--href="javascript:;"-->
                               <!--title="删除">删除</a>-->
                            <a style="text-decoration:none" class="btn radius btn-xs btn-danger"
                               onClick="del('{:url(\''.\\think\\Request::instance()->controller().'/del')}',{$vo.id})"
                               href="javascript:;"
                               title="删除">删除</a>
                        </td>
                    </tr>
                    {/volist}
                </tbody>
            </table>
        </div>

    </form>
        {$list->render()}

    </div>
{/block}